Skip to content

vfs: add ZipProvider - #5

Closed
pipobscure wants to merge 22 commits into
ziparchivesfrom
zipvfsprovider
Closed

vfs: add ZipProvider#5
pipobscure wants to merge 22 commits into
ziparchivesfrom
zipvfsprovider

Conversation

@pipobscure

Copy link
Copy Markdown
Owner

Add a node:vfs provider backed by a node:zlib ZIP archive - a ZipBuffer held in memory or a ZipFile on disk - that exposes the archive's members as a virtual filesystem tree. The provider is read-only unless the backing archive is writable, and offers both asynchronous and synchronous operations. Available as vfs.ZipProvider.

Archkon added 2 commits July 30, 2026 16:14
Glob matchers capture the path platform when they are created. Include
the platform in the cache key so path.posix and path.win32 do not share
incompatible matchers for the same pattern.

Signed-off-by: Archkon <[email protected]>
PR-URL: nodejs#64571
Fixes: nodejs#64570
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Moshe Atlow <[email protected]>
Signed-off-by: Archkon <[email protected]>
PR-URL: nodejs#64679
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Guy Bedford <[email protected]>
trivikr added 2 commits July 30, 2026 18:57
Preserve pointer-like argument conversions for buffer and arraybuffer
signatures after Fast API optimization. Keep memory-backed arguments
on the specialized native fast path.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: openai:gpt-5.6-sol
PR-URL: nodejs#64639
Fixes: nodejs#64638
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Add i32, int32, u32, and uint32 to Fast API integer validation so
optimized calls reject invalid values instead of allowing V8 to
coerce or truncate them.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: openai:gpt-5.6-sol
PR-URL: nodejs#64691
Fixes: nodejs#64690
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
trivikr and others added 12 commits July 31, 2026 04:11
Check whether the database is open in enableLoadExtension() and
setAuthorizer() before passing the connection to SQLite. This prevents
calls after close() from terminating the process and makes them throw
ERR_INVALID_STATE instead.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: nodejs#64812
Fixes: nodejs#64811
Reviewed-By: Edy Silva <[email protected]>
Reviewed-By: René <[email protected]>
Create the deep directory tree with one recursive mkdirSync() call.
This avoids repeatedly resolving increasingly long paths and prevents
timeouts on slower CI hosts.

Signed-off-by: Kamat, Trivikram <[email protected]>
Assisted-by: codex:gpt-5.6-sol
PR-URL: nodejs#64813
Refs: https://github.com/nodejs/reliability/issues?q=sort%3Aupdated-desc%20%22test-vfs-readdir-symlink-recursive%22
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Tim Perry <[email protected]>
Since 6aa42f9, configure.py collects every .cc and .h file under
test/cctest into the node_cctest_sources variable, so a new C++ unit
test no longer has to be listed in the sources of the cctest target.
Document the feature-gated source lists that still need to be updated
by hand instead.

Refs: nodejs#56885

Signed-off-by: Soul Lee <[email protected]>
PR-URL: nodejs#64814
Refs: nodejs#56885
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: Tim Perry <[email protected]>
PR-URL: nodejs#64720
Reviewed-By: Aviv Keller <[email protected]>
PR-URL: nodejs#64829
Reviewed-By: René <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
The byte controller's [[pendingPullIntos]] list was still a plain array
consumed with ArrayPrototypeShift, while every other per-chunk queue in
the WHATWG streams implementation has moved to the Queue ring buffer.
BYOB reads push and shift one descriptor per read, and Array.prototype
shift has real per-call cost even at length 1.

Back the descriptor list with the same lazily materialized Queue used
for the request queues, so constructing a byte stream still allocates
no descriptor storage.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: nodejs#64818
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Gürgün Dayıoğlu <[email protected]>
Signed-off-by: avivkeller <[email protected]>
PR-URL: nodejs#64830
Fixes: nodejs#58887
Reviewed-By: Moshe Atlow <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Original commit message:

    fix(inspector): hold on to promises

    Keep `m_evaluationResult` strong for evaluations
    until the promise settles or the request is cancelled.

    Bug: 536271637
    Change-Id: If21cc4aa0ba6bb2e2722d5ee73eb7744a0ead207
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/8123081
    Commit-Queue: Simon Zünd <[email protected]>
    Reviewed-by: Simon Zünd <[email protected]>
    Reviewed-by: Kim-Anh Tran <[email protected]>
    Cr-Commit-Position: refs/heads/main@{#108874}

Refs: v8/v8@5177b10
Co-authored-by: avivkeller <[email protected]>
PR-URL: nodejs#64631
Reviewed-By: Daeyeon Jeong <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Signed-off-by: avivkeller <[email protected]>
PR-URL: nodejs#64631
Refs: v8/v8@5177b10
Reviewed-By: Daeyeon Jeong <[email protected]>
Reviewed-By: Chengzhong Wu <[email protected]>
Replace the manual `options.encoding` type check in stream iterator
consumers with the shared validator. Add coverage for non-string values
in the async and sync text consumers.

Signed-off-by: sjungwon03 <[email protected]>
PR-URL: nodejs#64754
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
Add typings for the heap_utils internal binding and register it in
InternalBindingMap.

Signed-off-by: HoonDongKang <[email protected]>
PR-URL: nodejs#64816
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
Correct the coverage typo in TODO comments for QUIC modules.

Signed-off-by: sjungwon03 <[email protected]>
PR-URL: nodejs#64486
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Daeyeon Jeong <[email protected]>
Reviewed-By: Ulises Gascón <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Ethan Arrowood <[email protected]>
jasnell and others added 6 commits August 1, 2026 06:15
Signed-off-by: James M Snell <[email protected]>
Assisted-by: Claude/Opus
PR-URL: nodejs#64314
Reviewed-By: Matteo Collina <[email protected]>
Signed-off-by: Rawal27 <[email protected]>
PR-URL: nodejs#64837
Reviewed-By: Mike McCready <[email protected]>
Reviewed-By: Chemi Atlow <[email protected]>
Reviewed-By: Colin Ihrig <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
Add ZIP archive support to the node:zlib module through three classes
and a set of helpers:

- ZipEntry: a single archive member, with buffered reads (content()),
  bounded-memory streaming reads (contentIterator()), and
  create()/createStream() for building members.
- ZipFile: random access to an archive backed by a file descriptor,
  reading members lazily without retaining their content and writing
  new members in place; opened with open()/openSync().
- ZipBuffer: a zero-copy, in-memory view over an archive already held
  in a Buffer.

createZipArchive() serializes a sequence of entries into an archive
byte stream, and setMaxZipContentSize() bounds the default in-memory
decompression size. Every operation has both an asynchronous and a
synchronous form.

Signed-off-by: Philipp Dunkel <[email protected]>
PR-URL: nodejs#64339
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
ffi-test-common.js duplicated the platform branch already exposed
as ffi.suffix, risking drift if lib/ffi.js changes. Reuse it, and
require it after skipIfFFIMissing() so a build without FFI skips
instead of throwing.

Also assert ffi.suffix resolves to the correct value per platform,
since test-ffi-module.js only checked that the key exists.

Signed-off-by: leah-1ee <[email protected]>
PR-URL: nodejs#64840
Reviewed-By: Paolo Insogna <[email protected]>
Reviewed-By: Aviv Keller <[email protected]>
a7d16a8 introduced destructured uses of assert and fixtures, which
the test lint rules forbid, plus bare strictEqual/throws calls that
were never imported and threw ReferenceError at runtime. Use the
assert and fixtures namespaces directly.

Signed-off-by: Matteo Collina <[email protected]>
PR-URL: nodejs#64902
Reviewed-By: Mike McCready <[email protected]>
Reviewed-By: Filip Skokan <[email protected]>
Reviewed-By: James M Snell <[email protected]>
Add a node:vfs provider backed by a node:zlib ZIP archive - a ZipBuffer
held in memory or a ZipFile on disk - that exposes the archive's members
as a virtual filesystem tree. The provider is read-only unless the
backing archive is writable, and offers both asynchronous and
synchronous operations. Available as vfs.ZipProvider.

Signed-off-by: Philipp Dunkel <[email protected]>
@pipobscure

Copy link
Copy Markdown
Owner Author

Will propose as PR into nodejs/node:main

@pipobscure pipobscure closed this Aug 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.